let matrix: [[Int]] = [
    [1, 2, 3],
    [4, 5, 6],
    [7, 8, 9],
]

// 访问二维数组元素
let value = matrix[1][2]  // 6
print("Value at (1, 2): \(value)")

// 遍历二维数组
for row in matrix {
    for element in row {
        print(element, terminator: " ")
    }
    print()
}
// 输出:
// 1 2 3
